import { NowTime } from '../../../Game/Config/ConstData';
import { GameEventType, RecordType } from '../../../Game/Config/GameEnum';
import { PlayerParams } from '../../Config/DataConfig';
import { HandleCode } from '../../Handle/Handler';
import { HandlerManager } from '../../Handle/HandlerManager';
import { WebRequestHttp } from '../../Handle/WebRequestHttp';
import { GameData } from '../../Manager/DataManager';
import { EventManager } from '../../Manager/EventManager';
import { CallBackHandler } from '../PoolObj/CallBackHandler';
import PlatformBase from './PlatformBase';

// const tt = window['tt'];
const byteFeedGameUrl = 'https://dyzc.cygame666.cn/game/user/readyScenario/send';

/* eslint-disable */
export default class TTPlatform extends PlatformBase {
  shareImgId: string = '';
  shareImgUrl: string = '';
  $recordManager: any;
  $recordStartTimer: number;
  $recordEndTimer: number;
  $insertTimer: number;
  resumeBannerTimer: number = -1;
  firstTime: number;
  initFramework() {
    this.platformApi = window['tt'];
    this.$videoAd = null;
    this.$recordManager = null;
    this.$recordStartTimer = -1;
    this.$recordEndTimer = -1;
    this.$videoId = '169j0g584ns62c994c';
    this.$bannerId = '6690951phqi3t4kcdm';
    this.$insertId = '13m6c72gkg4l7qqckd';
    this.firstTime = NowTime();
    window['ad'] = false;
    window['insertAd'] = false;
    this.registerEvent();
  }

  registerEvent() {
    // console.log(window['wx'], window['wx'].onShareAppMessage);
    // const self = this;

    // window['tt'].showShareMenu({
    //   withShareTicket: true,
    //   menus: ['shareAppMessage', 'shareTimeline'],
    // });

    // window['tt'].updateShareMenu({
    //   withShareTicket: true,
    //   success: () => {},
    // });

    // window['tt'].onShareAppMessage(function () {
    //   return {
    //     imageUrlId: self.shareImgId,
    //     imageUrl: self.shareImgUrl,
    //   };
    // });

    // let queryObj = {
    //   key1: 'value1',
    //   key2: 'value2',
    // };

    // window['tt'].shareMessageToFriend({
    //   openId: 'xxxxx',
    //   templateId: 'xxxxxx',
    //   query: JSON.stringify(queryObj),
    //   success(res) {
    //     console.log('success');
    //   },
    //   fail(res) {
    //     console.log('fail', res);
    //   },
    // });

    // window['tt'].onUserCaptureScreen(function () {
    //   // 用户截屏了
    //   window['tt'].showShareImageMenu({
    //     path: '',
    //   });
    // });

    // window['tt'].onShow(() => {});

    // window['tt'].onShareAppMessage(function (res) {
    //   // 当监听到用户点击了分享或者拍抖音等按钮后，会执行该函数
    //   console.log(res.channel);
    //   // do something
    //   return {
    //     // 执行函数后，这里是需要该函数返回的对象
    //     title: '分享标题',
    //     imageUrl: 'https:// example.com/test.png',
    //     query: 'k1=v1&k2=v2',
    //     success() {
    //       console.log('分享成功');
    //     },
    //     fail(e) {
    //       console.log('分享失败', e);
    //     },
    //   }; // 返回的对象会传入window['tt'].shareAppMessage进行最终分享
    // });

    window['tt'].onShow((res) => {
      console.log('启动参数：', res.query);
      console.log('来源信息：', res.refererInfo);
      console.log('场景值：', res.scene);
      console.log('启动场景字段：', res.launch_from, ', ', res.location);

      if (res != null && res.launch_from == 'homepage' && res.location == 'sidebar_card') {
        // gameD.SidebarAward++;
        // gameD.SaveData();
      }
    });

    window['tt'].showShareMenu({
      success(res) {
        console.log('已成功显示转发按钮');
      },
      fail(err) {
        console.log('showShareMenu 调用失败', err.errMsg);
      },

      complete(res) {
        console.log('showShareMenu 调用完成');
      },
    });

    this.checkScene();
    this.checkShortcutState();
    // window['tt'].onTouchEnd(() => {});

    // setInterval(this.checkSession, 60);
  }

  shareAppMessage(type: string) {
    let shareData = {};
    switch (type) {
      case 'Template':
        shareData = {
          templateId: '', // 替换成通过审核的分享ID
          query: '',
          success() {
            console.log('分享成功');
          },

          fail(e) {
            console.log('分享失败');
          },
        };
        break;
      case 'Custom':
        shareData = {
          title: '测试分享',
          desc: '测试描述',
          imageUrl: '',
          query: '',
          success() {
            console.log('分享成功');
          },

          fail(e) {
            console.log('分享失败');
          },
        };
        break;
      case 'TemplateAndCustom':
        shareData = {
          templateId: '', // 替换成通过审核的分享ID
          title: '测试分享',
          desc: '测试描述',
          imageUrl: '',
          query: '',
          success() {
            console.log('分享视频成功');
          },

          fail(e) {
            console.log('分享视频失败');
          },
        };
        break;
      case 'Friend':
        shareData = {
          channel: 'invite', // 拉起邀请面板分享游戏好友
          title: '测试分享',
          desc: '测试描述',
          imageUrl: '',
          query: '',
          success(res) {
            console.log('分享成功' + JSON.stringify(res));
          },

          fail(e) {
            console.log('分享失败');
          },
        };
        break;
      case 'Record':
        shareData = {
          channel: 'token',
          title: '测试分享口令',
          desc: '测试描述',
          templateId: '', // 替换成通过审核的分享ID
          query: '',
          success() {
            console.log('分享成功');
          },

          fail(e) {
            console.log('分享失败');
          },
        };
        break;
    }
    window['tt'].shareAppMessage(shareData);
  }

  checkScene(): void {
    if (window['tt'] && window['tt'].checkScene) {
      window['tt'].checkScene({
        scene: 'sidebar',
        success(res) {
          console.log('支持侧边栏', res.isExist, res.err);
          window['sidebarActive'] = true;
        },
        fail(err) {
          console.log('暂不支持侧边栏', err.errMsg, err.errNo);
          window['sidebarActive'] = false;
        },
      });
    }
  }

  navigateToScene(): void {
    window['tt'].navigateToScene({
      scene: 'sidebar',

      success: (res) => {
        console.log('navigate to scene success');
        // 跳转成功回调逻辑
        // 给予奖励
      },
      fail: (res) => {
        console.log('navigate to scene fail: ', res);
        // 跳转失败回调逻辑
      },
    });
  }

  /** 登录 */
  login(callback?: CallBackHandler) {
    this.$loginCallback = callback;
    const self = this;
    window['tt'].login({
      force: true,
      success(res) {
        self.$appCode = res.code;
        self.$loginCallback?.execute({ code: self.$appCode });
        HandlerManager.Ins().handle(HandleCode.MAIN_SIGNIN, self.$appCode);
        console.log('login 调用成功', self.$appCode, res.anonymousCode);
      },
      fail(res) {
        console.log('login 调用失败');
      },
    });
  }

  loadUserInfo() {
    const self = this;
    window['tt'].authorize({
      scope: 'scope.userInfo',
      success() {
        // 用户同意授权用户信息
        self.getUserData();
      },
      fail() {},
    });
  }

  getUserData() {
    const self = this;
    window['tt'].getUserInfo({
      success: (res) => {
        // 已经授权，直接获取用户信息
        const userInfo = res.userInfo;
        GameData.changePlayerAttr(PlayerParams.nickname, userInfo.nickName, true);
        GameData.changePlayerAttr(PlayerParams.avatarUrl, userInfo.avatarUrl, true);
        GameData.changePlayerAttr(PlayerParams.getUserInfo, true, true);
        HandlerManager.Ins().handle(HandleCode.USERS_UPDATEINFOCACHE);
      },
      fail: () => {},
    });
  }

  /** 检测登录状态 */
  checkSession() {
    const self = this;
    window['tt'].checkSession({
      success() {
        console.log('session 未过期');
      },
      fail() {
        console.log('session 已过期，需要重新登录');
        self.login();
      },
    });
  }

  /** 直接转发 */
  shareMessage() {
    const self = this;
    window['tt'].shareAppMessage({
      // title: '转发标题',
      imageUrlId: self.shareImgId,
      imageUrl: self.shareImgUrl,
    });
  }

  openVibrateShort() {
    // gameD.SharkState &&
    window['tt'].vibrateShort({
      success: () => {
        // console.log('ovs s');
      },
      fail: () => {
        // console.log('ovs f');
      },
      complete: () => {
        // console.log('ovs c');
      },
    });
  }

  openVibrateLong(t: number = 15) {
    // gameD.SharkState &&
    window['tt'].vibrateShort(t);
  }

  getAppid() {
    // @ts-ignore
    return window['tt'].getLaunchOptionsSync().extra.appId;
  }

  requestSubscribeMessage() {
    const tmplIds = ['CONTENT552346626'];
    window['tt'].requestSubscribeMessage({
      tmplIds: tmplIds,
      success: (res) => {
        window['tt'].showModal({
          title: '订阅成功',
        });
      },
      fail: (res) => {
        window['tt'].showModal({
          title: '订阅失败',
          content: JSON.stringify(res),
        });
      },
      complete: (res) => {
        // window['tt'].showModal({
        //   title: '订阅完成',
        //   content: JSON.stringify(res),
        // });
      },
    });
  }

  reportScene() {
    console.log('启动时长ms', Date.now() - this.firstTime);
    window['tt'].reportScene({
      sceneId: 7001,
      costTime: Date.now() - this.firstTime,
      success(res) {
        // 上报接口执行完成后的回调，用于检查上报数据是否符合预期
        console.log(res);
      },
      fail(res) {
        // 上报报错时的回调，用于查看上报错误的原因：如参数类型错误等
        console.log(res);
      },
    });
  }

  customReport(sceneid: number, contentIDs: string[], _timesTamp: number) {
    const testTime = _timesTamp;
    const openId = GameData.playerParams.get(PlayerParams.openId);
    console.log('直出上报时间戳', _timesTamp);
    // const testTime = Math.ceil((Date.now() - 86400000) / 1000);
    // console.log('【测试】直出上报时间戳', testTime);
    console.log('【测试】直出openid', openId);
    const data = {
      appid: this.getAppid(),
      openid: openId,
      scene: sceneid,
      content_ids: contentIDs,
      extra: '',
      timestamp: testTime,
    };
    WebRequestHttp.requestPost(byteFeedGameUrl, data, (ret) => {
      console.log('post feedgame:', ret);
    });
  }
  getLaunchOptionsSync() {
    return window['tt'].getLaunchOptionsSync();
  }

  /** 检测是否订阅直出 */
  checkFeedSubscribeStatus(sceneId: number): Promise<void> {
    return new Promise((resolve, reject) => {
      window['tt'].checkFeedSubscribeStatus({
        type: 'play',
        scene: sceneId,
        success(res) {
          console.log(JSON.stringify(res));
          resolve(res.status);
        },
        fail(res) {
          console.log(JSON.stringify(res));
          reject(true);
        },
      });
    });
  }

  /** 发起直出订阅 */
  async requestFeedSubscribe(sceneId: number, content: string) {
    const ret = await this.checkFeedSubscribeStatus(sceneId);
    // if (ret) return;
    return new Promise((resolve, reject) => {
      window['tt'].requestFeedSubscribe({
        type: 'play',
        scene: sceneId,
        contentIDs: [content],
        success(res) {
          console.log('requestFeedSubscribe', JSON.stringify(res));
          resolve(res.success);
        },
        fail(res) {
          console.log('requestFeedSubscribe', JSON.stringify(res));
          reject(false);
        },
      });
    });
  }

  sendDesktop(e) {}
  /** 调起添加桌面图标 */

  hasShortcutInstalled(e) {}
  /** 是否已添加桌面图标 */
  getIsDesktop() {}
  /** 播放音乐 */

  playMusic(e, t) {}
  /** 暂停音乐播放 */
  stopMusic() {}
  /** 播放音效 */

  playSound(e, t) {}
  /** 暂停音效 */

  stopSound(e) {}
  /** 退出游戏 */
  exitGame() {}
  /** 提示窗口 */

  showToast(e, i, d) {}
  createLupingBtn() {}
  createMoreGameBtn() {}

  /** 添加桌面图标 */
  addShortcut() {
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    const self = this;
    if (!window['clickAddShortcut']) return;
    window['clickAddShortcut'] = false;
    const info = window['tt'].getSystemInfoSync();
    if (info.appName.toUpperCase() === 'DOUYIN' || info.appName.toUpperCase() === 'DOUYIN_LITE') {
      window['tt'].addShortcut({
        success: () => {
          console.log('桌面Icon添加成功');
          self.showToast('桌面Icon添加成功', '', 1000);
          // EventManager.Ins().emit(GameEventType.ADD_SHORT_CUT, true);
        },
        fail: (res) => {
          console.log('桌面Icon添加失败', JSON.stringify(res));
          self.showToast('桌面Icon添加失败', '', 1000);
          // EventManager.Ins().emit(GameEventType.ADD_SHORT_CUT, false);
        },
        // eslint-disable-next-line @typescript-eslint/no-unused-vars
        complete: (res) => {},
      });
    } else {
      self.showToast('暂不支持该功能', '', 1000);
    }
  }

  /** 检测是否有桌面图标 */
  checkShortcutState(): void {
    const info = window['tt'].getSystemInfoSync();
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    const self = this;
    console.log('宿主名：', info.appName);
    if (info.appName.toUpperCase() === 'DOUYIN' || info.appName.toUpperCase() === 'DOUYIN_LITE') {
      // do something
      window['tt'].checkShortcut({
        success(res) {
          console.log('检查快捷方式', res.status);
          if (!res.status.exist || res.status.needUpdate) {
            // 是否需要更新快捷方式
            window['addShortcut'] = true;
            window['tt'].onTouchEnd(self.addShortcut.bind(self));
          } else {
            window['addShortcut'] = false;
            window['checkShortcutAward'] = true;
          }
        },
        fail(res) {
          console.log('检查快捷方式失败', res.errMsg);
          window['addShortcut'] = false;
          // if(res.)
          const sync = window['tt'].getSystemInfoSync();
          if (sync && sync.platform === 'ios') {
            window['tt'].onTouchEnd(self.addShortcut.bind(self));
          }
        },
      });
    } else {
      console.log('未支持添加桌面API');
      window['addShortcut'] = false;
    }
  }

  loadBanner() {
    const obj = {
      adUnitId: this.$bannerId,
      adIntervals: 30,
      style: {
        left: 0,
        top: 0,
        width: 128,
      },
    };
    this.$bannerAd = window['tt'].createBannerAd(obj);
  }

  resumeBanner() {}

  showBanner(isShow: boolean) {
    // if (constD.testGame) return;

    const t = this;
    if (isShow) {
      if (this.$bannerAd == null) t.loadBanner();
      this.$bannerAd.show();
    } else if (this.$bannerAd) {
      this.$bannerAd.hide();
    }
  }

  openBanner(e) {}
  hideBanner() {}

  protected startShowVideo() {
    // if (constD.testGame) {
    //   ManagetCtrl.Ins.uiMgr.showAlert('成功获取激励奖励');
    //   this.$adIndex = index;
    //   this.adFinish();
    //   return;
    // }

    const self = this;
    if (window['ad']) {
      // ManagetCtrl.Ins.uiMgr.showAlert('请勿频繁点击');
      console.log('请勿频繁点击', this.$adIndex);
      return;
    }
    window['ad'] = true;
    setTimeout(() => {
      window['ad'] = false;
    }, 2000);
    const obj = {
      adUnitId: this.$videoId,
    };
    if (this.$videoAd == null) {
      this.$videoAd = window['tt'].createRewardedVideoAd(obj);
      const onLoad = () => {
        // ManagetCtrl.Ins.uiMgr.showAlert('观看完成可获得激励');
        console.log('观看完成可获得激励');
        self.$videoAd.show();
        self.showVideoSuccess();
      };

      const onError = (res: any) => {
        // ManagetCtrl.Ins.uiMgr.showAlert('正在加载视频广告');
        console.log('正在加载视频广告');
        console.log(res.errMsg, res.errCode);
      };

      const onClose = (res: any) => {
        console.log('用户关闭广告', JSON.stringify(res));
        if (res.isEnded) {
          // do something
          // ManagetCtrl.Ins.uiMgr.showAlert('成功获取激励奖励');
          self.adFinish();
        } else {
          console.log('用户未看完广告');
        }
        // if (res.count) {
        //   // 在支持多例模式的版本上会返回该字段，并且是否返回该字段与multiton是否为true无关
        //   // 判断观看了几次广告
        // }
      };
      // this.$videoAd.offLoad(onLoad.bind(this));
      // this.$videoAd.offError(onError.bind(this));
      // this.$videoAd.offClose(onClose.bind(this));

      this.$videoAd.onLoad(onLoad.bind(this));
      this.$videoAd.onError(onError.bind(this));
      this.$videoAd.onClose(onClose.bind(this));

      this.$videoAd.load();
    } else {
      this.$videoAd.show();
    }
    return true;
  }
  showInsertAd() {
    // if (window['insertAd'] || constD.testGame) return;

    if (this.$insertAd == null) {
      const obj = {
        adUnitId: this.$insertId,
      };
      this.$insertAd = window['tt'].createInterstitialAd(obj);
      this.$insertAd.onLoad(() => {});
      this.$insertAd.onError((res: any) => {
        console.log(res.errMsg, res.errCode);
      });
      this.$insertAd.onClose(() => {});
      this.$insertAd
        .load()
        .then(() => {
          if (this.$insertTimer != -1) clearTimeout(this.$insertTimer);
          this.$insertTimer = setTimeout(() => {
            window['insertAd'] = false;
            if (this.$insertTimer != -1) clearTimeout(this.$insertTimer);
            this.$insertTimer = -1;
          }, 90000) as unknown as number;

          this.$insertAd.show().then(() => {
            console.log('插屏广告展示成功');
          });
        })
        .catch((err) => {
          console.log(err);
        });
    } else {
      if (this.$insertTimer != -1) clearTimeout(this.$insertTimer);
      this.$insertTimer = setTimeout(() => {
        window['insertAd'] = false;
        if (this.$insertTimer != -1) clearTimeout(this.$insertTimer);
        this.$insertTimer = -1;
      }, 90000) as unknown as number;
      this.$insertAd.show();
    }
  }

  loadNativeAd(e) {}

  showNativeInBox(e, t, i) {}

  showNativeInsert(e, t) {}

  showNativeInsertAd(e, i, a) {}

  showNativeBannerAd(e, i, a) {}

  showSmallNative(e) {}
  recordScreen() {}
  removeScreen() {}
  pauseRecord() {}

  showTTBanner(e) {}

  reportRankingList(e) {}
  getRankingList() {}
  showQQBox() {}

  navigateToVideo(e) {}
  jumpToDY() {}
  loadSubpackage(bundleName: string, callback: () => unknown = null) {
    const loadTask = window['tt'].loadSubpackage({
      name: bundleName, // name 可以填 name 或者 root
      success(res) {
        // 分包加载成功后通过 success 回调
        callback && callback();
      },
      fail(res) {
        // 分包加载失败通过 fail 回调
      },
    });
    loadTask.onProgressUpdate((res) => {
      // console.log('下载进度', res.progress);
      // console.log('已经下载的数据长度', res.totalBytesWritten);
      // console.log('预期需要下载的数据总长度', res.totalBytesExpectedToWrite);
    });
  }
  showElectPortalAd(e) {}
  showwxCustomAd(e, t) {}
  openContent(e, t) {}
  closeContent() {}
  showNativeIcon(e, t) {}
  showNativeBanner(e, t) {}
  showPlayBanner(e) {}
  getHttpId() {}
  onHasShortcutInstalled(e) {}

  /** 自动录屏 */
  AutoRecord(type: RecordType) {
    if (window['tt'] && window['tt'].getGameRecorderManager == undefined) return;
    if (this.$recordManager == null) {
      this.$recordManager = window['tt'].getGameRecorderManager();
      this.$recordManager.onStart((res) => {
        console.log(res.videoPath);
      });
      this.$recordManager.onPause((res) => {
        console.log(res.videoPath);
      });
      this.$recordManager.onResume((res) => {
        console.log(res.videoPath);
      });
      this.$recordManager.onStop((res) => {
        if (!window['recording']) {
          // window['tt'].showToast({
          //   title: '录屏时长不得低于3秒',
          //   duration: 1000,
          // });
          return;
        }
        console.log(res.videoPath);
        window['tt'].shareAppMessage({
          title: '无敌合成',
          channel: 'video',
          extra: {
            videoPath: res.videoPath, // 录屏后得到的文件地址
            withVideoId: true,
          },
          success(res1) {
            window['tt'].showToast({
              title: '分享成功',
              duration: 1000,
            });
          },
          fail(e) {
            window['tt'].showToast({
              title: '分享失败',
              duration: 1000,
            });
          },
        });
      });
    }

    if (type === RecordType.START && window['recording']) {
      type = RecordType.RESUME;
    }

    switch (type) {
      case RecordType.START:
        this.$recordManager.start({
          duration: 299,
        });
        if (this.$recordStartTimer) clearTimeout(this.$recordStartTimer);
        if (this.$recordEndTimer) clearTimeout(this.$recordEndTimer);
        this.$recordStartTimer = setTimeout(() => {
          window['recording'] = true;
        }, 3000) as unknown as number;
        this.$recordEndTimer = setTimeout(() => {
          window['record'] = true;
          // window['tt'].showToast({
          //   title: '录制已达最大时长',
          //   duration: 1000,
          // });
        }, 299000) as unknown as number;
        break;
      case RecordType.PAUSE:
        if (window['recording']) {
          //暂停录制
          this.$recordManager.pause();
        }
        break;
      case RecordType.RESUME:
        if (window['recording']) {
          // 继续录制
          this.$recordManager.resume();
        }
        break;
      case RecordType.STOP:
        if (this.$recordStartTimer) clearTimeout(this.$recordStartTimer);
        if (this.$recordEndTimer) clearTimeout(this.$recordEndTimer);
        this.$recordStartTimer = null;
        this.$recordEndTimer = null;
        this.$recordManager.stop();
        break;
      case RecordType.DESTROY:
        if (this.$recordStartTimer) clearTimeout(this.$recordStartTimer);
        if (this.$recordEndTimer) clearTimeout(this.$recordEndTimer);
        this.$recordStartTimer = null;
        this.$recordEndTimer = null;
        window['recording'] = false;
        window['record'] = false;
        this.$recordManager.stop();
        break;
    }
  }

  setImRankData(type: number, score: number) {
    window['tt'].setImRankData({
      dataType: 0, // 成绩为数字类型
      value: '' + score, // 该用户得了999999分
      priority: 0, // dataType为数字类型，不需要权重，直接传0
      extra: 'extra',
      success(res) {
        console.log('setImRankData success res:', res);
      },
      fail(res) {
        console.log('setImRankData fail res:', res.errMsg);
      },
    });
  }

  getImRankList() {
    // 跑酷游戏自动生成好友跑酷榜
    window['tt'].getImRankList({
      relationType: 'friend', // 只展示好友榜
      dataType: 0, // 只圈选type为数字类型的数据进行排序
      rankType: 'month', // 每月1号更新，只对当月1号到现在写入的数据进行排序
      suffix: '分', // 数据后缀，成绩后续默认带上 “分”
      rankTitle: 'rankTitle', // 标题
      success(res) {
        console.log('getImRankData success res:', res);
      },
      fail(res) {
        console.log('getImRankData fail res:', res.errMsg);
      },
    });
  }

  trackEvent(e, o = null) {
    // if (window['tt'].uma) {
    //   switch (e) {
    //     case EventId.JewelSummoner_LevelStart:
    //       window['tt'].uma.stage.onStart(o);
    //       break;
    //     case EventId.JewelSummoner_LevelPass:
    //     case EventId.JewelSummoner_LevelFail:
    //       window['tt'].uma.stage.onEnd(o);
    //       break;
    //     default:
    //       window['tt'].uma.trackEvent(e, o);
    //       break;
    //   }
    // }
    window['tt'].uma && window['tt'].uma.trackEvent(e, o);
    window['tt'].reportAnalytics && window['tt'].reportAnalytics(e, o);
  }

  requestHttpGet(url: string, data: any, callback: CallBackHandler, headers?: { [key: string]: string }): void {
    this.platformApi.request({
      method: 'GET',
      url: url,
      data: data,
      success(res) {
        callback.execute(res.data);
      },
    });
  }

  requestHttpPost(url: string, data: any, callback: CallBackHandler, headers?: { [key: string]: string }): void {
    this.platformApi.request({
      method: 'POST',
      url: url,
      data: data,
      success(res) {
        console.log(res);
        callback && callback.execute(res.data);
      },
    });
  }

  notifyMiniProgramPlayableStatus() {}
}
